#pragma once

#include <opencv\cv.h>

#include "VectorUtil.h"
#include "RenderSystem.h"

using namespace TUMAR::MarkerTracking;
using namespace TUMAR::Render;

namespace TUMAR { namespace Snowman {

	class BallGame;

	class BallGameTimer : public TimerCallback
	{
	private:
		BallGame* game;
	public:
		BallGameTimer(BallGame* game);
		virtual void Tick(void) const;
	};

	class BallGame
	{
	private:
		BallGameTimer timer;

		double angle;
		double velocity;
		cv::Vec3d position;

		int interval;
		double time;

		bool finished;
	public:
		BallGame(void);
		~BallGame(void);

		void Start(cv::Vec3d start, cv::Vec3d target);

		bool IsFinished(void);

		void Update(void);

		const cv::Vec3d* GetCurrentBallPosition(void);
	};

}}